#ifndef _DX11STRUCTURE_H
#define _DX11STRUCTURE_H
#include <d3d11.h>
#include <dxgi.h>

using namespace std;

class DX11Structure {

private:
	IDXGISwapChain *swapChain;
	ID3D11Device *device;
	ID3D11DeviceContext *deviceContext;
	ID3D11Texture2D *backBuffer;
	ID3D11RenderTargetView *renderTargetView;
	ID3D11DepthStencilView *depthStencilView;

public:
	DX11Structure() {}
	~DX11Structure() {
		swapChain->Release();
		device->Release();
		deviceContext->Release();
		renderTargetView->Release();
	}

	void setSwapChain(IDXGISwapChain *pSwapChain) { swapChain = pSwapChain; }
	void setDevice(ID3D11Device *pDevice) { device = pDevice; }
	void setDeviceContext(ID3D11DeviceContext *pDeviceContext) { deviceContext = pDeviceContext; }
	void setBackBuffer(ID3D11Texture2D *pBackBuffer) { backBuffer = pBackBuffer; }
	void setRenderTargetView(ID3D11RenderTargetView *pRenderTargetView) { renderTargetView = pRenderTargetView; }
	void setDepthStencilView(ID3D11DepthStencilView *pDepthStencilView) { depthStencilView = pDepthStencilView; }

	IDXGISwapChain * getSwapChain() { return swapChain; }
	ID3D11Device * getDevice() { return device; }
	ID3D11DeviceContext * getDeviceContext() { return deviceContext; }
	ID3D11Texture2D * getBackBuffer() { return backBuffer; }
	ID3D11RenderTargetView * getRenderTargetView() { return renderTargetView; }
	ID3D11DepthStencilView * getDepthStencilView() { return depthStencilView; }
};

#endif